#ifndef __QUEUE_H_f57dbdf4eeb6488ba57a26c18f8494d3__
#define __QUEUE_H_f57dbdf4eeb6488ba57a26c18f8494d3__

#include "kmalloc.h"

typedef struct _queue_list_entry
{
	struct _queue_list_entry *next;
	struct _queue_list_entry *prev;
	void *p;
}queue_list_entry;

typedef bool (*queue_equal)(void *p1,void *p2);

typedef struct _queue_list
{
	queue_list_entry *head;
	queue_list_entry *tail;
	uint32_t size;
	queue_equal fn;
}queue_list;

queue_list_entry *queue_list_find_entry(queue_list *queueList,void *p);

void queue_list_delete_item(queue_list *queueList,queue_list_entry *item);

void queue_list_push_back(queue_list *queueList,queue_list_entry *item);

queue_list_entry *queue_entry_create(void *p);

queue_list *queue_list_create(queue_equal fn);

#endif